//
//  Dictionary+Additions.swift
//  MGExtensionsKit
//
//  Created by Max's mini on 2020/6/8.
//

import Foundation

public extension Dictionary {
    var JSONData: Data? {
        do {
            let data = try JSONSerialization.data(withJSONObject: self, options: JSONSerialization.WritingOptions.init(rawValue: 0))
            return data
        }catch _ {
            return nil
        }
    }
}
